package com.bupt.cosmfl.cosmflweb.exception;

import lombok.Getter;
import lombok.Setter;

public class BusinessException extends RuntimeException {
    private final static Integer defaultErrorCode = 500;

    @Getter
    @Setter
    private Integer errCode;

    public BusinessException() {
        super();
        this.errCode = BusinessException.defaultErrorCode;
    }

    public BusinessException(String msg) {
        super(msg);
        this.errCode = BusinessException.defaultErrorCode;
    }

    public BusinessException(int errCode, String msg) {
        super(msg);
        this.errCode = errCode;
    }
}
